#ifndef MYTEXTEDIT_H
#define MYTEXTEDIT_H

#include <QWidget>
#include"myhighlight.h"
namespace Ui {
class MytextEdit;
}

class MytextEdit : public QWidget
{
    Q_OBJECT

public:
    explicit MytextEdit(QWidget *parent = nullptr);
    ~MytextEdit();
    void initConnect();
    void initFont();
    void initHighlight();
    void HighLightCurrentLine();
    void setText(QString file);
    QString getText();
    bool savefile();
    bool saveAsFile();
    void setfilename(QString filename);
    QString getfilename();
    void setCopy();
    void setPaste();
    void setCut();
    void setunderline(bool checked);
    void setItalics(bool checked);
    void setUndo();
    void setRedo();
    void setBoler(bool checked);
    void setFont();

private:
    Ui::MytextEdit *ui;
    QString curFile;


    // QWidget interface
};



#endif // MYTEXTEDIT_H
